﻿using MVVMLightDemo.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MVVMLightDemo.Data
{
    public class DataProvider
    {
        /// <summary>
        /// 返回List<TreeModel>集合
        /// </summary>
        /// <returns></returns>
        public static List<TreeModel> GetTreeInfo()
        {
            List<TreeModel> infos = new List<TreeModel>();
            TreeModel model1 = new TreeModel { NodeID = "1", NodeName = "苹果1" };
            TreeModel model2 = new TreeModel { NodeID = "1-1", NodeName = "苹果2" };
            TreeModel model3 = new TreeModel { NodeID = "1-2", NodeName = "苹果3" };
            TreeModel model4 = new TreeModel { NodeID = "1-1-1", NodeName = "苹果4" };
            TreeModel model5 = new TreeModel { NodeID = "1-1-2", NodeName = "苹果5" };
            TreeModel model6 = new TreeModel { NodeID = "1-2-1", NodeName = "苹果6" };
            model2.ChildInfo.Add(model4);
            model2.ChildInfo.Add(model5);
            model3.ChildInfo.Add(model6);
            model1.ChildInfo.Add(model2);
            model1.ChildInfo.Add(model3);
            infos.Add(model1);
            return infos;
        }

        /// <summary>
        /// 返回List<ListBoxMdoel>集合
        /// </summary>
        /// <returns></returns>
        public static List<ListBoxModel> GetListBoxInfo()
        {
            return new  List<ListBoxModel>
            {
                new ListBoxModel{Img="/MVVMLightDemo;component/Images/apple.png",Name="苹果"},
                new ListBoxModel{Img="/MVVMLightDemo;component/Images/pineapple.png",Name="凤梨"},
                new ListBoxModel{Img="/MVVMLightDemo;component/Images/strawberry.png",Name="草莓"},
                new ListBoxModel{Img="/MVVMLightDemo;component/Images/watermelon.ico",Name="草莓2"},
                //new ListBoxModel{Img="/MVVMLightDemo;component/Images/009.jpg",Name="草莓3"},

            };
        }
    }
}
